<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .sullivan-grid {
            border: 1px solid red;
            width: 100px;
            height: 100px;
        }
        .sullivan-grid-item {
            border: 1px solid red;
        }
    </style>
</head>
<body>
<div id="grid" style="width: 300px;height: 300px;"> </div>
<div class="xx"><h2>xxxxxxxxxxxxxxxx</h2></div>
<script src="./jquery.js"></script>
<script>
    let gridMap = [
        "grid-area-01", "grid-area-01", "grid-area-03", "grid-area-04",
        "grid-area-09", "grid-area-10", "grid-area-07", "grid-area-08",
        "grid-area-09", "grid-area-10", "grid-area-11", "grid-area-12",
        "grid-area-13", "grid-area-14", "grid-area-15", "grid-area-16"
    ];

    function updateGridItem (hideAreas, exclude) {
        let areaItem = hideAreas.pop();
        while (areaItem) {
            gridMap.pop();
            gridMap = gridMap.reduce((def, next) => {
                if (next !== exclude && next > areaItem) {
                    def.push(areaItem);
                    areaItem = hideAreas.pop();
                }
                def.push(next)
                return def
            }, [])
        }
    }

    updateGridItem(["grid-area-02"], "grid-area-10")

    console.log($('div:has(h2)'))
</script>
</body>
</html>